import { http } from '@/utils/http'

export interface IChat {
  action: string
  /**
   * 发送内容
   */
  content: string
  id: number
  msgid: string
  /**
   * 发送时间
   */
  msgtime: string
  msgtype: string
  roomid: string
  /**
   * 发送人
   */
  sender: string
  /**
   * 接收人
   */
  tolist: string
  [property: string]: any
}

export function getChatDataList(params: { butlerId: string; externalUserid: string }) {
  return http.get('/system/wechat_chat_data/getChatDataList', params)
}

/**
 * 获取登录用户信息

 */
export function getInfo() {
  return http.get('/getInfo')
}

/// chat/getOwnerWechatInfo
export function getOwnerWechatInfo(params: { external_userid: string }) {
  return http.get('/chat/getOwnerWechatInfo', params)
}
